﻿<%@ Page Title="" Language="C#" MasterPageFile="~/SiteAdmin/MasterPage.master" AutoEventWireup="true" CodeFile="CostItem.aspx.cs" Inherits="PMSWeb_CostItem" %>

<asp:Content ID="Content1" ContentPlaceHolderID="contentPlaceHolderID" Runat="Server">
<asp:Panel ID="pnlGrid" runat="server" CssClass="centerPanel" Width="95%">
<div class="webPanelBorder" >
    <div class="webPanelCaption">收费项管理</div>
    <div class="webPanelContent"> 
        <ofcc:GridView ID="gridView" runat="server" AutoGenerateColumns="False" 
            OnRowDataBound="gridView_RowDataBound" 
            OnRowCommand="gridView_RowCommand"
            onsplitpageindexchange="gridView_SplitPageIndexChange">
            <Columns>
                <asp:TemplateField HeaderText="选择">
                    <ItemTemplate>
                        <input ID="CostID" checked="checked" name="CostID" type="radio" 
                            value='<%#DataBinder.Eval(Container.DataItem,"CostID")%>' />
                    </ItemTemplate>
                    <HeaderStyle Width="40px" />
                </asp:TemplateField>
                <asp:TemplateField HeaderText="收费项">
                <ItemTemplate>
                      <asp:LinkButton ID="btnView" runat="server" CommandName="btnView_Click" 
                        CommandArgument='<%#DataBinder.Eval(Container.DataItem,"CostID").ToString()%>'>
                        <%#DataBinder.Eval(Container.DataItem, "Subject").ToString()%>
                        [<%#DataBinder.Eval(Container.DataItem, "CostID").ToString()%>]
                        </asp:LinkButton>
                </ItemTemplate>
                 </asp:TemplateField>
                <asp:BoundField DataField="Cycle" HeaderText="周期" />
                <asp:BoundField DataField="Money" HeaderText="金额(元)" />
                <asp:BoundField DataField="OrderIndex" HeaderText="排序" />
                <asp:BoundField DataField="IsSelected" HeaderText="默认选择" />
                <asp:BoundField DataField="IsUsed" HeaderText="是否使用" />
                <asp:BoundField DataField="IsDeleted" HeaderText="是否作废" />
            </Columns>
        </ofcc:GridView>
     </div>
</div>
<div class="webPanelButtonArea">
    <ofcc:LinkButton ID="btnAdd" runat="server" OnClick="btnAdd_Click" CssClass="linkButton" >新建收费项</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnEdit" runat="server" OnClick="btnEdit_Click" CssClass="linkButton" >修改收费项</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnRemove" runat="server"  ConfirmMessage="确定要删除吗?" OnClick="btnRemove_Click" CssClass="linkButton" >删除收费项</ofcc:LinkButton>
</div>
</asp:Panel>


<asp:Panel ID="pnlEdit" runat="server" Width="700px" Visible="false" CssClass="centerPanel">
<div class="webPanelBorder" >
    <div class="webPanelCaption">收费项管理</div>
    <div class="webPanelContent">
        <table cellspacing="1" class="table">
            <tr>
                <td class="tableSubjectWidth">收费项：
                </td>
                <td colspan="3"><asp:TextBox ID="tbSubject" runat="server" CssClass="shortInput" MaxLength="30" ></asp:TextBox>
                    <ofcc:RequiredField ID="RequiredField1" runat="server" />
                </td>
            </tr>
            <tr>
                <td>周期：</td>
                <td><asp:TextBox ID="tbCycle" runat="server" CssClass="smallInput" MaxLength="30" ></asp:TextBox>
                </td>
                <td>金额(元)：</td>
                <td><asp:TextBox ID="tbMoney" runat="server" CssClass="smallInput" MaxLength="20" ></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>排序：</td>
                <td><asp:TextBox ID="tbOrderIndex" runat="server" CssClass="smallInput" MaxLength="8" ></asp:TextBox>
                </td>
                <td>默认选择：</td>
                <td>
                <ofcc:RadioButtonList ID="rbIsSelected" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Text="是" Value="True" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="否" Value="False" ></asp:ListItem>
                </ofcc:RadioButtonList>
                </td>
            </tr>
             <tr>
                <td>是否使用：</td>
                <td>
                <ofcc:RadioButtonList ID="rbIsUsed" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Text="是" Value="True" Selected="True"></asp:ListItem>
                    <asp:ListItem Text="否" Value="False" ></asp:ListItem>
                </ofcc:RadioButtonList>
                </td>
                <td>是否作废：</td>
                <td>
                <ofcc:RadioButtonList ID="rbIsDeleted" runat="server" RepeatDirection="Horizontal">
                    <asp:ListItem Text="是" Value="True" ></asp:ListItem>
                    <asp:ListItem Text="否" Value="False" Selected="True"></asp:ListItem>
                </ofcc:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td>备注：</td>
                <td  colspan="3"><asp:TextBox ID="tbDescription" runat="server" CssClass="shortInput" Rows="5" MaxLength="100" TextMode="MultiLine"></asp:TextBox>
                </td>
            </tr>
        </table>
    </div>
</div>
<div class="webPanelButtonArea">
    <ofcc:LinkButton ID="btnSave" runat="server" OnClick="btnSave_Click" CssClass="linkButton" ValidationGroup="submit">保存</ofcc:LinkButton>
    <ofcc:LinkButton ID="btnCancel" runat="server" OnClick="btnCancel_Click"  CssClass="linkButton">取消</ofcc:LinkButton>
</div>
<asp:HiddenField ID="hfAddOrEdit" runat="server" />
<asp:HiddenField ID="hfCostID" runat="server" />
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbSubject"
    Display="None" ErrorMessage="请输入收费项名称" ValidationGroup="submit"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator3" runat="server" ControlToValidate="tbMoney" 
    Display="None" ErrorMessage="金额请输入数值类型" Operator="DataTypeCheck" Type="Double" ></asp:CompareValidator>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" EnableViewState="False"
    ShowMessageBox="True" ShowSummary="False" ValidationGroup="submit" />    
</asp:Panel>
</asp:Content>

